package com.sxbbc.common.core.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sxbbc.common.basics.utils.statics.StaticUtils;
import com.sxbbc.common.core.entity.jz.CReceivedAddr;
import com.sxbbc.common.core.mapper.jz.CReceivedAddrMapper;
import com.sxbbc.common.core.service.ICReceivedAddrService;

/**
 * <p>
 * 用户收货地址表 服务实现类
 * </p>
 *
 * @author leehao
 * @since 2019-05-15
 */
@Service
public class CReceivedAddrServiceImpl extends ServiceImpl<CReceivedAddrMapper, CReceivedAddr> implements ICReceivedAddrService {

	@Override
	public CReceivedAddr getDefaultAddr(Integer cid) {
		QueryWrapper<CReceivedAddr> wrapper = new QueryWrapper<CReceivedAddr>();
		wrapper.eq("cid", cid).eq("defaul", StaticUtils.STATUS_YES);
		return super.getOne(wrapper);
	}

}
